<template lang="pug">
  .app-container
    aside
      h2 数据资产
      ul
        li 项目配置
        li 空间管理
        li
          router-link(to="/product") 产品配置
        li
          router-link(to="/devices") 设备管理
        li 推送配置

    right-panel 666
    <el-table :data="tableData" stripe style="width: 100%">
      <el-table-column prop="name" label="姓名" width="180"></el-table-column>
      <el-table-column prop="address" label="地址">
        <template slot-scope="scope">
          <router-link :to="scope.row.address">{{scope.row.address}}</router-link>
        </template>
      </el-table-column>
    </el-table>
    h3 图标测试
    svg.svg-icon(aria-hidden="true")
      use(xlink:href="#icon-404")
</template>

<script>
// import { login } from '@api/login'
export default {
  name: 'Home',
  data () {
    return {
      tableData: [
        {
          date: '2016-05-02',
          name: '首页',
          address: '/'
        },
        {
          date: '2016-05-04',
          name: '401页面',
          address: '/401'
        },
        {
          date: '2016-05-01',
          name: '表格/基础表',
          address: '/table/base-table'
        },
        {
          date: '2020-007-15',
          name: '表格/基础表',
          address: '/scrollintoview'
        }
      ]
    }
  },
  created () {
    // axios
    //   .post('/api/substation/login/login.json', {
    //     userAccountNum: 'admin',
    //     password: 'feisjy',
    //     domain: ''
    //   })
    //   .then(function (response) {
    //     console.log(response)
    //   })
    //   .catch(function (error) {
    //     console.log(error)
    //   })
    // login('admin', 'feisjy', '').then(res => {
    //   console.log(res)
    // }).catch(error => {
    //   console.log(error)
    // })
  }
}
</script>
